//
//  ViewController.m
//  定时器
//
//  Created by 崔博 on 2018/9/11.
//  Copyright © 2018年 崔博. All rights reserved.
//

#import "ViewController.h"
#import "Proxy.h"
#import "Proxy1.h"
@interface ViewController ()
@property (nonatomic, strong) CADisplayLink *link;
@property (nonatomic, strong) NSTimer *timer;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    self.link = [CADisplayLink displayLinkWithTarget:self selector:@selector(linkTest)];
//    [self.link addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
    self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:[Proxy1 proxtWith:self] selector:@selector(timerTest) userInfo:nil repeats:YES];
}
- (void)timerTest
{
    NSLog(@"%s",__func__);
}
- (void)linkTest
{
    NSLog(@"%s",__func__);
}
- (void)dealloc
{
    [self.timer invalidate];
}
@end
